<?php


class VehicleTable extends Doctrine_Table {
  public static $conts = array(
          'vehicle_transmission' => array (
                          0 => 'Automatic',
                          1 => 'Manual',
                          3 => 'Tiptronic'
          ),
          'vehicle_fuel' => array (
                          0 => 'Petrol',
                          1 => 'Disel',
          ),
         
          'vehicle_price_range' => array (
                          1 =>
                          array (
                                          'name' => 'Under $6K',
                                          'value' => '<6000',
                          ),
                          2 =>
                          array (
                                          'name' => '$6K - $10K',
                                          'value' => 'between 6000 and 10000',
                          ),
                          3 =>
                          array (
                                          'name' => '$10K - $15K',
                                          'value' => 'between 10000 and 15000',
                          ),
                          4 =>
                          array (
                                          'name' => '$15K - $20K',
                                          'value' => 'between 15000 and 20000',

                          ),
                          5 =>
                          array (
                                          'name' => '$20K - $30K',
                                          'value' => 'between 20000 and 30000',
                          ),
                          6 =>
                          array (
                                          'name' => '$30K - $40K',
                                          'value' => 'between 30000 and 40000',
                          ),
                          7 =>
                          array (
                                          'name' => 'Over $40K',
                                          'value' => '>40000',
                          ),
          ),
  );
  public static function getInstance() {
    return Doctrine_Core::getTable('Vehicle');
  }
  public static function getFeatured() {
	return Doctrine_Query::create()->from('Vehicle')->where('is_featured=?',1)->orderby('created_at desc')->limit(16)->execute();
  }
}
